<?php  if ( ! defined('BASEPATH')) exit('No direct script access allowed');
/*
| -------------------------------------------------------------------------
| URI ROUTING
| -------------------------------------------------------------------------
| This file lets you re-map URI requests to specific controller functions.
|
| Typically there is a one-to-one relationship between a URL string
| and its corresponding controller class/method. The segments in a
| URL normally follow this pattern:
|
|	example.com/class/method/id/
|
| In some instances, however, you may want to remap this relationship
| so that a different class/function is called than the one
| corresponding to the URL.
|
| Please see the user guide for complete details:
|
|	http://codeigniter.com/user_guide/general/routing.html
|
| -------------------------------------------------------------------------
| RESERVED ROUTES
| -------------------------------------------------------------------------
|
| There area two reserved routes:
|
|	$route['default_controller'] = 'welcome';
|
| This route indicates which controller class should be loaded if the
| URI contains no data. In the above example, the "welcome" class
| would be loaded.
|
|	$route['404_override'] = 'errors/page_missing';
|
| This route will tell the Router what URI segments to use if those provided
| in the URL cannot be matched to a valid route.
|
*/

$route['default_controller'] = "home";

$route['404_override'] = '';

$route["admin/category"] = "category/admin_index";
$route["admin/category/add/(:num)"] = "category/admin_add/$1";
$route["admin/category/add"] = "category/admin_add";
$route["admin/category/delete/(:num)"] = "category/admin_delete/$1";
$route["admin/category/orderupdate"] = "category/admin_orderupdate/$1";

$route["admin/tag"] = "tag/admin_index";
$route["admin/tag/add/(:num)"] = "tag/admin_add/$1";
$route["admin/tag/add"] = "tag/admin_add";
$route["admin/tag/delete/(:num)"] = "tag/admin_delete/$1";

$route["admin/group"] = "group/admin_index";
$route["admin/group/add/(:num)"] = "group/admin_add/$1";
$route["admin/group/add"] = "group/admin_add";
$route["admin/group/delete/(:num)"] = "group/admin_delete/$1";

$route["admin/type"] = "type/admin_index";
$route["admin/type/add/(:num)"] = "type/admin_add/$1";
$route["admin/type/add"] = "type/admin_add";
$route["admin/type/delete/(:num)"] = "type/admin_delete/$1";

$route["admin/user"] = "user/admin_list";
$route["admin/user/add"] = "user/register";
$route["admin/user/unban/(:num)"] = "user/admin_unban/$1";
$route["admin/user/delete/(:num)"] = "user/admin_delete/$1";
$route["admin/user/add/(:num)"] = "user/edituser/$1";

$route["user/editprofile"] = "user/edituser";
$route["user/editprofile/(:num)"] = "user/edituser/$1";

$route["admin/brand"] = "brand/admin_index";
$route["admin/brand/add"] = "brand/admin_add";
$route["admin/brand/add/(:num)"] = "brand/admin_add/$1";
$route["admin/brand/addmodel"] = "brand/admin_addmodel";
$route["admin/brand/addmodel/(:num)"] = "brand/admin_addmodel/$1";
$route["admin/brand/delete/(:num)"] = "brand/admin_delete/$1";

$route["admin/model"] = "model/admin_index";
$route["admin/model/add/(:num)"] = "model/add_model/$1";
$route["admin/model/delete/(:num)"] = "model/admin_delete/$1";

//Home
$route['admin'] = 'home/admin_index';

$route['category/(:any)/(:num)'] = 'category/index/$2';
$route['category/(:any)'] = 'category/index';



$route['post/(:num)'] = 'post/index/$1';
$route['tent/(:num)'] = 'tent/index/$1';

$route['contactus'] = 'page/contactus';
$route['admin/options/contactus'] = 'options/admin_contactus';

$route['admin/forum'] = 'forum/admin_index';
$route['admin/forum/addcategory/(:num)'] = 'forum/admin_addcategory/$1';
$route['admin/forum/addcategory'] = 'forum/admin_addcategory';
$route['admin/forum/edit/(:num)'] = 'forum/admin_editcategory/$1';
$route['admin/forum/deletecategory/(:num)'] = 'forum/admin_deletecategory/$1';

//Home
//$route['(:any)'] = 'home';

/* End of file routes.php */
/* Location: ./application/config/routes.php */